home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
pbaseiv.zip
/
P4WPR003.TIP
< prev
next >
Wrap
Text File
|
1991-12-16
|
3KB
|
80 lines
Since I write for scientific and technical journals, I need
to enter some unusual characters (like `') in Microsoft
Word documents. These characters are available in some
fonts--generally in the extended ASCII range--but not in
others. In the past, I had to search through my text and
manually select fonts and point sizes for each character to
get them to print properly.
To simplify this tedious task, I wrote a macro that searches
for a character or a string of characters. Every time it
finds a match, it changes the font and point size for the
desired text so it will print correctly.
After starting the macro, you'll be prompted to type a
character or string to modify. If you press <Enter> at this
point, the macro will end. But if you enter a character or
string, you'll be prompted for a font name, such as Courier
or Elite, and then for a point size, like 12 or 14. If you
press <Enter> at these two prompts, the defaults will be set
to 12-point Courier. You can easily change these default
values by substituting a different font name or size in the
macro's `set' commands.
Richard F. Laherty
Terre Haute, Indiana
Editor's note: Using this macro is a lot easier than setting
up special characters with style sheets. Load the Word
document NF.DOC from the P4WPM directory on your PowerBase
*.* Volume IV diskette, or type it in exactly as shown
below. [Note: If you type the macro in manually, use
<Ctrl>-[ and <Ctrl>-] to enter the left and right chevrons
(« and », respectively).] Highlight the entire macro, and
press <Esc>Cnf.mac<Enter> to copy the text of the macro to
the glossary and name it NF.MAC. Whether you save this file
for future reference or discard it, be sure to save the
glossary by selecting Transfer Glossary Save and pressing
<Enter>.
If you're not familiar with the fonts your printer has
available, display a list of font names by selecting Format
Character, moving the cursor to `Font name', and pressing
<F1>. Press <Esc> to return to editing. To test the macro,
load a document with characters to reformat. With the cursor
at the top of the document, enter nf.mac, and press <F3> to
execute the macro. Type in the text to modify, the font name
you just selected, and the point size. The macro will search
for and reformat every text match. Repeat this step for
other text you want to change.
This Microsoft Word macro makes finagling font changes
quick and easy.
«ask string=?Search for?»
«if string = ""»
«quit»
«endif»
«ask font=?Font name?»
«if font = ""»
«set font = "Courier"»
«endif»
«ask point=?Point size?»
«if point = ""»
«set point = "12"»
«endif»
<ctrl pgup>
<esc>S«string»<enter>
«while found»
<esc>FC<down 3>«font»<tab>
«point»<enter><right>
<esc>S<enter>
«endwhile»
Title: Finagling Fonts in MS Word
Category: WPR
Issue date: Feb 1991
Editor: Tom Swan
Supplementary files: P4WPM\NF.DOC